from rest_framework.throttling import AnonRateThrottle, UserRateThrottle


class CustomAnonRateThrottle(AnonRateThrottle):
    """
    IP限流
    """
    THROTTLE_RATES = {"anon": "2/min"}


class CustomUserRateThrottle(UserRateThrottle):
    """
    用户限流
    """
    THROTTLE_RATES = {"anon": "2/min"}

